package com.hctforgreen.greenservice;

import com.hctforgreen.greenservice.utils.HctConstants;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

public class CalculatorUtilsMainActivity extends ParentActivity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_calculator_utils);

		initSkinLayout();

		initWindows();
	}


	public void initWindows() {
		final TextView titleTv = (TextView) findViewById(R.id.tv_title);
		titleTv.setText(getString(R.string.title_calculator_main));
		
		findViewById(R.id.btn_back).setOnClickListener(this);
		findViewById(R.id.layout_refrigerantCalculator).setOnClickListener(this);
		
		findViewById(R.id.btn_right_first).setBackgroundResource(R.drawable.btn_common_help_selector);
		findViewById(R.id.btn_right_first).setOnClickListener(this);
	}


	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.layout_refrigerantCalculator:// 冷媒计算
			Intent intent = new Intent(this, RefrigerantCalculatorActivity.class);
			startActivity(intent);
			break;
		case R.id.btn_back:// 返回
			finish();
			break;
		case R.id.btn_right_first:// 帮助
			intent = new Intent(this, SupportMidActivity.class);
			intent.putExtra(HctConstants.ON_ACTIVITY_KEY_INFO_TYPE,
					SupportMidActivity.GREE_TOOLS);
			startActivity(intent);
			break;
		}

	}
}

